import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useLayoutInfoStore = defineStore('LayoutInfo', () => {
  /**
   * 是否是小屏幕
   */
  const breakpoint = ref(false)
  function onChangeBreakpoint(value: boolean) {
    breakpoint.value = value
  }
  /**
   * 是否折叠菜单
   */
  const collapse = ref(false)
  function onChangeCollapse(value: boolean) {
    collapse.value = value
  }

  return { breakpoint, onChangeBreakpoint, collapse, onChangeCollapse }
})
